package com.OutterSpace;

import org.anddev.andengine.engine.camera.Camera;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.Scene.IOnSceneTouchListener;
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.input.touch.TouchEvent;

public class GameControll implements IOnSceneTouchListener {
	private int centerX;
	private int centerY;
	Sprite sprite;
	AnimatedSprite aSprite;
	private Camera camera;
	ScrollableParallaxBackground background;
	
	public GameControll(int centerX, int centerY) {
		// TODO Auto-generated constructor stub
	}

	public GameControll(Sprite sprite) {
		this.sprite = sprite;
	}
	
	public GameControll(AnimatedSprite aSprite) {
		this.aSprite = aSprite;
	}

	public GameControll(Camera camera) {
		this.camera = camera;
	}

	public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {
		if (pSceneTouchEvent.isActionDown()) {
			float x = pSceneTouchEvent.getX();
			float y = pSceneTouchEvent.getY();
			
			//sprite.setPosition(x, y);
			//sprite.registerEntityModifier(new MoveModifier(1, sprite.getX(), x, sprite.getY(), y));
/*			if (aSprite.isAnimationRunning()) {
				aSprite.stopAnimation(0);
			}else{
				aSprite.animate(100);
			};
*/		};
		return false;
	}

}
